package com.moore.service.Impl;

import com.moore.bean.Role;
import com.moore.dto.ResponseData;
import com.moore.mapper.RoleMapper;
import com.moore.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.moore.utils.Logger.toLog;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleMapper roleMapper;

    @Override
    public ResponseData getAllRoles() {
        toLog("获取所有角色成功");
        List<Role> roles = roleMapper.getAllRoles();
        return new ResponseData(200,"获取成功",roles,0);
    }
}
